package com.aos.erp.manager.model.applyschool.vo;

import com.aos.erp.manager.enums.ApplyStatus;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import java.io.Serializable;
import java.util.Date;
import com.aos.erp.manager.enums.SchoolType;

/**
 * <p>
 * 驾校信息表
 * </p>
 *
 * @author ywb
 * @since 2018-11-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_drivers_school")
public class ApplyListVo implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long    id;

    /**
     * 区域
     */
    @ApiModelProperty(value = "区域")
    private String region;


    /**
     * 驾校名称
     */
    @ApiModelProperty(value = " 驾校名称")
    private String name;

    /**
     * 驾校type
     */
    @ApiModelProperty(value = " 类别  （1：直营总校  2：非直营总校  3:分校 4：报名点）")
    @TableField("type")
    private SchoolType type=SchoolType.gather;


    /**
     * 所属管辖
     */
    @ApiModelProperty(value = " 所属管辖")
    private String divisionName;

    /**
     * 详细地址
     */
    @ApiModelProperty(value = " 详细地址")
    private String address;

    /**
     * 联系人
     */
    @ApiModelProperty(value = " 联系人")
    private String contacts;
    /**
     * 手机号
     */
    @ApiModelProperty(value = " 手机号")
    private String  mobile;

    /**
     * 状态
     */
    @ApiModelProperty(value = " 状态")
    @TableField("status")
    private ApplyStatus status=ApplyStatus.audit;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间")
    private Date  created;

    /**
     * 审核时间
     */
    @ApiModelProperty(value = "审核时间")
    private Date  auditdate;

    @Override
    public String toString() {
        return "ApplyListVo{" +
                "id=" + id +
                ", region='" + region + '\'' +
                ", name='" + name + '\'' +
                ", divisionName='" + divisionName + '\'' +
                ", address='" + address + '\'' +
                ", contacts='" + contacts + '\'' +
                ", mobile='" + mobile + '\'' +
                ", status=" + status +
                ", created=" + created +
                ", auditdate=" + auditdate +
                '}';
    }

    public  String getStatusName(){
        return status.getDesc();
    }

    public  String getSchoolTypeName(){
        return type.getDesc();
    }
}
